{extend name='main'}

{block name="button"}

{/block}

{block name="content"}
<div class="think-box-shadow">
    {include file='patrol_shop/index_search_warning'}
    <table class="layui-table margin-top-10" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='text-left nowrap'>序号</th>
            <th class='text-left nowrap'>门店名称</th>
            <th class='text-left nowrap'>设备ID</th>
            <th class='text-left nowrap'>通道ID</th>
            <th class='text-left nowrap'>图片</th>
            <th class='text-left nowrap'>当前员工名称</th>
            <th class='text-left nowrap'>状态</th>
            <th class='text-left nowrap'>报警</th>
            <th class='text-left nowrap'>短信状态</th>
            <th class='text-left nowrap'>发送时间</th>
            <th class='text-left nowrap'>发送结果</th>
            <th class='text-left nowrap'>模板状态</th>
            <th class='text-left nowrap'>模板发送时间</th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {volist name="list" id="vo" key='key'}
        <tr data-dbclick>
            <td class='text-left nowrap'>{$key+(input('page',1)-1)*input('limit',10)}</td>
            <td class='text-left nowrap'>{$vo.shop_name|default='-'}</td>
            <td class='text-left nowrap'>{$vo.equip_id|default='-'}</td>
            <td class='text-left nowrap'>{$vo.channel_id|default='-'}</td>
            <td class='text-left nowrap'>
                {empty name='vo.inspection_picture'}
                暂无图片
                {else}
                <a class="layui-btn layui-btn-normal  layui-btn-xs" data-title="图片查看"
                   data-modal='{:url("admin/patrol_shop/look_index_pc")}?id={$vo.id}'>查 看</a>
                {/empty}
            </td>
            <td class='text-left nowrap'>{$vo.shop_clerks_name|default='-'}</td>
            <td class='text-left nowrap'>
                <span style="" {eq name='$vo.status' value='1' } class="color-green" {else} class="color-red"{/eq}>{$vo.status_title}</span>
            </td>
            <td class='text-left nowrap'>{:date('Y-m-d H:i:s',$vo['inspection_time'])}</td>
            <td class='text-left'>
                {if $vo.status eq 1}不发送{else}{if $vo.is_send eq 1}待发送{else}已发送{/if}{/if}
            </td>
            <td class='text-left'>{if $vo.is_send eq 2}{$vo.send_time|date='Y-m-d H:i:s'|default=''}{else}-{/if}</td>
            <td class='text-left'>{$vo.send_msg|default='-'}</td>
            <td class='text-left'>
                {if $vo.is_send_wxtpl eq 1} <span style="color: #8D8D8D">待发送</span> {else} <span style="color: #01AAED">已发送</span> {/if}
            </td>
            <td class="text-left">
                {if $vo.wxtpl_send_time neq ''}
                {$vo.wxtpl_send_time|date='Y-m-d H:i:s'}
                {/if}
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}